package com.test.controller;

import com.test.service.MoneyService;
import com.test.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping(value = "/money")

public class MoneyController {

	@Autowired
	MoneyService moneyService;

	@RequestMapping(value = "/query")
	@ResponseBody
	//读取所有用户
	public String query() {
		return "" + moneyService.query("user1").getMoney();
	}
}
